package kassConverter.Converter.FrontEnd.Units;

import java.awt.Color;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import kassConverter.Converter.BackEnd.Distances;

public class UnitsPanel extends JPanel{

	/**
	 * 
	 */
	private static final long serialVersionUID = 9185265235419357619L;
	
	private JComboBox toConvert, fromConvert;
	
	private JLabel titleLabel, toLabel, fromLabel, amountLabel, answerLabel;
	
	private JButton converterButton;
	
	private JTextField amountField, answerField;


	public UnitsPanel(){
		setBackground(Color.WHITE);
		
		
		setLayout(null);
		
		toConvert = new JComboBox(Distances.values());
		fromConvert = new JComboBox(Distances.values());
		toLabel = new JLabel("to");
		fromLabel = new JLabel("From:");
		titleLabel = new JLabel("Distance Converter");
		amountLabel = new JLabel("Type Number:");
		answerLabel = new JLabel("Answer:");
		converterButton = new JButton("Convert");
		amountField = new JTextField();
		answerField = new JTextField();
		
		add(toConvert);
		add(fromConvert);
		add(toLabel);
		add(fromLabel);
		add(titleLabel);
		add(amountLabel);
		add(converterButton);
		add(amountField);
		add(answerField);
		add(answerLabel);
		
		toConvert.setBounds(85,90, 120, 30);	
		fromConvert.setBounds(255, 90, 120, 30);
		toLabel.setBounds(225, 90, 20, 30);
		titleLabel.setBounds(165, 10, 150, 30);
		amountLabel.setBounds(5, 45, 80, 30);
		fromLabel.setBounds(5, 90, 40, 30);
		answerLabel.setBounds(5, 170, 50, 30);
		converterButton.setBounds(190, 130, 80, 30);
		amountField.setBounds(85, 45, 120, 30);
		answerField.setBounds(85, 170, 290, 30);
		
	}
}
